﻿using System;
using System.Collections.Generic;
using System.Text;

namespace NLBS.WebControls.UI
{
    internal class ClientSerializableAttribute : Attribute
    {
        private bool _renderIfDefault;
        private string _propertyName;

        public bool RenderDefault
        {
            get { return _renderIfDefault; }
        }

        public string PropertyName
        {
            get { return _propertyName; }
        }

        public ClientSerializableAttribute()
        {
            _renderIfDefault = false;
            _propertyName = string.Empty;
        }

        public ClientSerializableAttribute(bool renderIfDefault)
            : this()
        {
            _renderIfDefault = renderIfDefault;
        }

        public ClientSerializableAttribute(string propertyName)
            : this()
        {
            _propertyName = propertyName;
        }

        public ClientSerializableAttribute(string propertyName, bool renderIfDefault)
        {
            _propertyName = propertyName;
            _renderIfDefault = renderIfDefault;
        }
    }
}
